package co.edu.unal.bioingenium.kbmed.web;

import co.edu.unal.bioingenium.kbmed.knowledge.KnowledgeService;
import co.edu.unal.bioingenium.kbmed.knowledge.visualization.VisualizationService;
import co.edu.unal.bioingenium.kbmed.retrieval.knowledge.process.RetrieveService;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 *
 * @author alejandro
 */
public class ContextLoaderListener implements ServletContextListener {

    public void contextInitialized(ServletContextEvent sce) {
        Logger.getLogger(ContextLoaderListener.class.getName()).log(Level.INFO, "Initializing kbmed-web context");
        RetrieveService.getInstance();
        VisualizationService.getInstance();
        KnowledgeService.getInstance();
    }

    public void contextDestroyed(ServletContextEvent sce) {
        Logger.getLogger(ContextLoaderListener.class.getName()).log(Level.INFO, "contextDestroyed called");
    }
}
